 $(document).ready(function(){
		
 });
$(document).ready(function(){
            $("#take").change(function(){
                $("#take option").each(function(){
                    if($(this).attr("selected") == true)
                    {
                        if($(this).val() == "yes")
                        {
                            $("#take_table1").css("display", "block");
							$("#take_table").css("display", "none");
                        }
                        else
                        {
                            $("#take_table1").css("display", "none");
							$("#take_table").css("display", "block");
                        }
                    }
                });
            });
        });
var q =0 ;
var o = document.getElementById('inn'); 
var b = document.getElementById('base_icon'); 
function queryclick(){
if(document.getElementById("base_icon1").value = "true");
	q=q-1;
	 if(q<7) 
	b.style.display = "block";o.style.display = "none";
	q=0;
}
function on_click(){
  if(document.getElementById("base_icon1").value == "true");
  	 q=q+1;
	 if(q>=7) 
	b.style.display = "none";
   }

$(document).ready(function(){//增加人数控制
	var fatie = $("#fatie");
	var option = fatie.find(".options dd");
	function list_again(){//选项重新排序
			option.each(function(){
				var i = $(this).index();
			})
	}
	
	option.find("a").live("click",function(){//删除选项
		$(this).parent().remove();
		list_again();
		})
	
	$('#base_icon').live('click',function(){
		if($('.options dd').length>8){
			$('#inn').css('display','block');
			return false;
		}
fatie.find(".options").append('<dd><label><span class="cro">*</span>乘客类型：<select name="" class="age"><option>成人(&gt;12岁)</option><option>儿童(2~12岁)</option></select></label><label class="name"><span class="cro">*</span>乘客姓名：<input name="" type="text" /></label><label class="num"><span class="cro">*</span>性别：<select name=""><option>男</option><option>女</option></select><span class="cro">*</span>出生日期：<input name="" type="text" /></label></label><label class="safe">保险：<select name="" ><option>0份</option><option selected="selected">1份</option><option>2份</option></select>￥20/份<br /></label><div class="no"><span class="cro">*</span>证件号码：<select name="" ><option >身份证</option><option>护照</option><option>其他</option></select><input name="input" type="text" class="int" /></div><a title="删除" id="base_icon1"href="javascript:void(0);" onclick="queryclick()">删除</a></dd>');
		option = fatie.find(".options dd");
		list_again();
	});
	
	$('.option a[title="删除"]').live('click',function(){
		$('#inn').css('display','none');
	});
		
});